package com.finance.system.bean.pojo;


import com.finance.framework.lang.BaseObject;
import lombok.Data;


@Data
public class Region extends BaseObject{
		public static final int LEVE_PROVINCE = 1;
		public static final int LEVE_CITY = 2;
		public static final int LEVE_COUNTY = 3;
		private String name;//区域名称
		private String code;//区域编码
		private int level;//级别 （0为国家 1为省直辖市 2为地级市 3县）
		private String pcode;//父级编码
		private String province;//父级编码省
		private String city;//父级编码市
		@Override
		public boolean equals(Object object){
			if(object instanceof Region){
				Region regionCode = (Region) object;
				return regionCode.getId().equals(this.getId());
			}
			return false;
		}
		@Override
		public int hashCode(){
			return this.getId().hashCode();
		}

 }